Deforesting in Accumulating Parameters via Type-Directed Transformations
نویسنده
چکیده
Classical deforestation methods fail to compose functions with accumulating parameters, which are function arguments to which intermediate result accumulates. This paper proposes a new deforestation method which solves this problem. The method is comprised of a few transformation steps, each of which is guided by type information. Though our solution draws its fundamental idea from a deforestation method that has been developed for attribute grammars, it is not merely a recast of an existing technique to another formalism. The new method provides a type-based account for the existing attribute grammar deforestation process. Further, it can deforest a class of functions that the attribute grammar deforestation cannot. These advantages are demonstrated by a few examples. It is also shown that the new method is as powerful as another method that has been developed for macro tree transducer composition.
منابع مشابه
On Deforesting Parameters of Accumulating Maps
Deforestation is a well-known program transformation technique which eliminates intermediate data structures that are passed between functions. One of its weaknesses is the inability to deforest programs using accumulating parameters. We show how intermediate lists built by a selected class of functional programs, namely ‘accumulating maps’, can be deforested using a single composition rule. Fo...
متن کاملOn descent for coalgebras and type transformations
We find a criterion for a morphism of coalgebras over a Barr-exact category to be effective descent and determine (effective) descent morphisms for coalgebras over toposes in some cases. Also, we study some exactness properties of endofunctors of arbitrary categories in connection with natural transformations between them as well as those of functors that these transformations induce between co...
متن کاملPalladium-catalyzed synthesis of cyclopentane-fused benzocyclobutenes via tandem directed carbopalladation/C-H bond functionalization.
A new Pd-catalyzed reaction for the stereoselective synthesis of cyclopentane-fused benzocyclobutenes is described. These transformations likely proceed via carbamate-directed carbopalladation followed by intramolecular C-H activation of an alkylpalladium intermediate. The mechanistic relationship between these transformations and Pd-catalyzed reactions of gamma-(n-Boc-amino)alkenes with aryl b...
متن کاملCharacterization and Phase Transformation of Spherical YSZ Powders Fabricated Via air Plasma Spray Method
Air plasma spray (APS) process is used to produce high density and flowability spherical powders. Phase transformation that occurred in this process isn’t well known. In this paper, the YSZ powders have been sprayed in water to investigate the morphology changes and phase transformations via air plasma spray (APS) method. Phase analysis of powders was examined by XRD and the crystallite size an...
متن کاملTransforming wealth: using the inverse hyperbolic sine (IHS) and splines to predict youth's math achievement.
The natural log and categorical transformations commonly applied to wealth for meeting the statistical assumptions of research may not always be appropriate for adjusting for skewness given wealth's unique properties. Finding and applying appropriate transformations is becoming increasingly important as researchers consider wealth as a predictor of well-being. We present an alternative transfor...
متن کامل